package org.yohailong.project.common.common.utils;

import org.yohailong.project.common.common.error.BizError;
import org.yohailong.project.common.common.error.BizException;

public class BizExceptionUtil {

    private BizExceptionUtil() {
        throw new AssertionError();
    }

    public static BizException obtain(BizError bizError) {
        return new BizException(bizError.errorCode(), bizError.errorMsg());
    }

    public static BizException obtain(BizError bizError, String errorMsg) {
        return new BizException(bizError.errorMsg(), errorMsg);
    }
}
